<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:jsf="http://xmlns.jcp.org/jsf"
    xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:p="http://primefaces.org/ui">

<f:view contentType="text/html;charset=UTF-8" encoding="UTF-8">
    <h:head>

    </h:head>
    <h:body>

        <h2>Primefaces Dialog Demo</h2>
        <h:form>
                
            <p:growl id="growl" showDetail="true" />
                 



            <p:commandButton value="Show Dialog" type="button" icon="pi pi-external-link" onclick="PF('dlg1').show()" />




            <p:dialog header="Dialog example" widgetVar="dlg1" minHeight="40" width="350" showEffect="fade">
                <p class="m-0">This tutorial shows how to run a Primefaces Dialog which includes a button in it</p>
                <f:facet name="footer">
                    <p:commandButton action="#{buttonView.action1}" update="growl" value="Yes" icon="ui-icon-check"
                        style="width: auto" />
                    <p:commandButton action="#{buttonView.action2}" update="growl" value="No" icon="ui-icon-check"
                        style="width: auto" />
                </f:facet>
            </p:dialog>


        </h:form>
    </h:body>
</f:view>

</html>